import { Column, Entity } from 'typeorm'
import { SoftCommonEntity } from '~/common/entity/common.entity'

@Entity({ name: 'c_video' })
export class MovieEntity extends SoftCommonEntity {
  @Column({ name: 'video_name', type: 'varchar', length: 255, comment: '视频名称', default: '' })
  videoName: string

  @Column({ name: 'video_url', type: 'varchar', length: 255, comment: '视频链接', default: '' })
  videoUrl: string

  @Column({ name: 'video_cover', type: 'varchar', length: 255, comment: '视频封面', default: '' })
  videoCover: string

  @Column({ name: 'video_season', type: 'int', comment: '视频季数', default: 0 })
  videoSeason: number

  @Column({ name: 'video_no', type: 'int', comment: '视频集数', default: 0 })
  videoNo: number

  @Column({ name: 'video_grade', type: 'int', comment: '学级，0 幼儿园，1-6 小学，7-8 初中', default: 0 })
  videoGrade: number

  // @Column({ name: 'video_srt_url', type: 'varchar', length: 255, comment: '字幕文件链接', default: '' })
  // videoSrtUrl: string

  // @Column({ name: 'video_srt_type', type: 'tinyint', comment: '字幕类型，1 人工字幕 2 AI字幕', default: 1 })
  // videoSrtType: number

  @Column({ name: 'video_tag_id', type: 'bigint', unsigned: true, comment: '标签ID', default: 0 })
  videoTagId: number

  // 非数据库字段，用于存储关联查询的标签名称
  tagName?: string
}
